﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenFile
{
    class BaseFile
    {
        public string filePath { get; set; }
        public string fileName { get; set; }

        public BaseFile(string filePath,string fileName) 
        {
            this.filePath = filePath;
            this.fileName = fileName;
        }

        /// <summary>
        /// 调用进程，打开指定的文件
        /// </summary>
        public void OpenFile()
        {
            ProcessStartInfo psi = new ProcessStartInfo(this.filePath + "\\" + this.fileName);
            Process pro = new Process();
            pro.StartInfo = psi;
            pro.Start();
        }
    }
}
